{% extends "base.html" %} {% block title %}Платежи{% if request.statuser %} :: {{ request.statuser.get_profile }}{% endif %}{% endblock %} {% load filters %} {% block content %} {% if payments_list %}
{% if user.is_staff and request.statuser %}<div class="information">Показаны только платежи для {{ request.statuser.get_profile }}, <a href="{% url nstat.traffic.views.payments %}">показать все?</a></div>{% endif %}
<table id="payments" class="listing">
  <thead>
    <tr>
      <th>
         ID
      </th>
      <th>
         Дата и время 
      </th>
      <th>
         Пользователь 
      </th>
      <th>
         Оформил платёж 
      </th>
      <th>
         Сумма 
      </th>
      <th>
         Тип платежа 
      </th>
      <th>
         Комментарий 
      </th>
    </tr>
  </thead>
  <tbody>
     {% for payment in payments_list %} 
    <tr class="{% cycle 'odd' 'even' %}">
      <td class="ID">
         {{ payment.id }}
      </td>
      <td class="date">
         {{ payment.date|date:"d.m.Y H:i" }}
      </td>
      <td class="username">
         {% if payment.user %}<a href="{% url userinfo payment.user.user.id %}">{{ payment.user }}</a> {% endif %}
      </td>
      <td class="cashier">
         {% if payment.cashier %}<a href="{% url userinfo payment.cashier.user.id %}">{{ payment.cashier }} </a>{% endif %}
      </td>
      <td class="payment_sum">
         {{ payment.sum|color_balance }} 
      </td>
      <td class="payment_category">
         {{ payment.category }} 
      </td>
      <td class="payment_comment">
         {{ payment.comment }} 
      </td>
    </tr>
     {% endfor %} 
  </tbody>
</table>
 {% else %} 
<p>
   Платежей пока не было. 
</p>
 {% endif %} {% endblock %}
